home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
thinkref
/
archive
/
THINKPascalUH2.1.sea
/
THINKPas Univ Hdr 2.1
/
Interfaces
/
CTBUtilities.p
< prev
next >
Wrap
Text File
|
1995-09-14
|
5KB
|
199 lines
{ Converted with MPW2TPas Tuesday, September 12, 1995 5:45:04 PM }
{}
{ File: CTBUtilities.p}
{ }
{ Contains: Communications Toolbox Utilities interfaces.}
{ }
{ Version: Technology: System 7.5}
{ Package: Universal Interfaces 2.1 in “MPW Latest” on ETO #18}
{ }
{ Copyright: © 1984-1995 by Apple Computer, Inc.}
{ All rights reserved.}
{ }
{ Bugs?: If you find a problem with this file, use the Apple Bug Reporter}
{ stack. Include the file and version information (from above)}
{ in the problem description and send to:}
{ Internet: apple.bugs@applelink.apple.com}
{ AppleLink: APPLE.BUGS}
{ }
{}
unit CTBUtilities;
interface
{$IFC UNDEFINED __CTBUTILITIES__}
{$SETC __CTBUTILITIES__ := 1}
uses
ConditionalMacros, Types, Memory, Quickdraw, Dialogs, StandardFile, AppleTalk;
{ $PUSH}
{ $ALIGN MAC68K}
{ $LibExport+}
const
{ version of Comm Toolbox Utilities }
curCTBUVersion = 2;
{ Error codes/types }
ctbuGenericError = -1;
ctbuNoErr = 0;
type
CTBUErr = OSErr;
const
chooseDisaster = -2;
chooseFailed = -1;
chooseAborted = 0;
chooseOKMinor = 1;
chooseOKMajor = 2;
chooseCancel = 3;
type
ChooseReturnCode = INTEGER;
const
nlOk = 0;
nlCancel = 1;
nlEject = 2;
type
NuLookupReturnCode = INTEGER;
const
nameInclude = 1;
nameDisable = 2;
nameReject = 3;
type
NameFilterReturnCode = INTEGER;
const
zoneInclude = 1;
zoneDisable = 2;
zoneReject = 3;
type
ZoneFilterReturnCode = INTEGER;
DialogHookProcPtr = ProcPtr; { FUNCTION DialogHook(item: INTEGER; theDialog: DialogPtr): INTEGER; }
DialogHookUPP = UniversalProcPtr;
const
uppDialogHookProcInfo = $000003A0; { FUNCTION (2 byte param, 4 byte param): 2 byte result; }
function NewDialogHookProc (userRoutine: DialogHookProcPtr): DialogHookUPP;
{$IFC NOT GENERATINGCFM }
inline
$2E9F;
{$ENDC}
function CallDialogHookProc (item: INTEGER; theDialog: DialogPtr; userRoutine: DialogHookUPP): INTEGER;
{$IFC NOT GENERATINGCFM}
inline
$205F, $4E90;
{$ENDC}
const
{ Values for hookProc items }
hookOK = 1;
hookCancel = 2;
hookOutline = 3;
hookTitle = 4;
hookItemList = 5;
hookZoneTitle = 6;
hookZoneList = 7;
hookLine = 8;
hookVersion = 9;
hookReserved1 = 10;
hookReserved2 = 11;
hookReserved3 = 12;
hookReserved4 = 13;
{ "virtual" hookProc items }
hookNull = 100;
hookItemRefresh = 101;
hookZoneRefresh = 102;
hookEject = 103;
hookPreflight = 104;
hookPostflight = 105;
hookKeyBase = 1000;
{ NuLookup structures/constants }
type
NLTypeEntry = record
hIcon: Handle;
typeStr: Str32;
end;
NLType = array[0..3] of NLTypeEntry;
NBPReply = record
theEntity: EntityName;
theAddr: AddrBlock;
end;
NameFilterProcPtr = ProcPtr; { FUNCTION NameFilter(VAR theEntity: EntityName): INTEGER; }
NameFilterUPP = UniversalProcPtr;
const
uppNameFilterProcInfo = $000000E0; { FUNCTION (4 byte param): 2 byte result; }
function NewNameFilterProc (userRoutine: NameFilterProcPtr): NameFilterUPP;
{$IFC NOT GENERATINGCFM }
inline
$2E9F;
{$ENDC}
function CallNameFilterProc (var theEntity: EntityName; userRoutine: NameFilterUPP): INTEGER;
{$IFC NOT GENERATINGCFM}
inline
$205F, $4E90;
{$ENDC}
type
ZoneFilterProcPtr = ProcPtr; { FUNCTION ZoneFilter(theZone: ConstStr32Param): INTEGER; }
ZoneFilterUPP = UniversalProcPtr;
const
uppZoneFilterProcInfo = $000000E0; { FUNCTION (4 byte param): 2 byte result; }
function NewZoneFilterProc (userRoutine: ZoneFilterProcPtr): ZoneFilterUPP;
{$IFC NOT GENERATINGCFM }
inline
$2E9F;
{$ENDC}
function CallZoneFilterProc (theZone: ConstStr32Param; userRoutine: ZoneFilterUPP): INTEGER;
{$IFC NOT GENERATINGCFM}
inline
$205F, $4E90;
{$ENDC}
function InitCTBUtilities: CTBUErr;
function CTBGetCTBVersion: INTEGER;
function StandardNBP (where: Point; prompt: ConstStr255Param; numTypes: INTEGER; var typeList: NLType; nameFilter: NameFilterUPP; zoneFilter: ZoneFilterUPP; hook: DialogHookUPP; var theReply: NBPReply): INTEGER;
function CustomNBP (where: Point; prompt: ConstStr255Param; numTypes: INTEGER; var typeList: NLType; nameFilter: NameFilterUPP; zoneFilter: ZoneFilterUPP; hook: DialogHookUPP; userData: LONGINT; dialogID: INTEGER; filter: ModalFilterUPP; var theReply: NBPReply): INTEGER;
{$IFC OLDROUTINENAMES }
function NuLookup (where: Point; prompt: ConstStr255Param; numTypes: INTEGER; var typeList: NLType; nameFilter: NameFilterUPP; zoneFilter: ZoneFilterUPP; hook: DialogHookUPP; var theReply: NBPReply): INTEGER;
function NuPLookup (where: Point; prompt: ConstStr255Param; numTypes: INTEGER; var typeList: NLType; nameFilter: NameFilterUPP; zoneFilter: ZoneFilterUPP; hook: DialogHookUPP; userData: LONGINT; dialogID: INTEGER; filter: ModalFilterUPP; var theReply: NBPReply): INTEGER;
{$ENDC}
{ $ALIGN RESET}
{ $POP}
{$ENDC}
{__CTBUTILITIES__}
implementation
end.